<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>promise.html</title>
	<style type="text/css">
	* {
		padding: 0;
		margin: 0;
	}
    </style>
</head>
<body>
	<div class="container">
		<h1>promise.html</h1>
	</div>
	<script src="https://cdn.staticfile.org/jquery/3.2.0/jquery.js"></script>
	<script type="text/javascript">
	var ok1 = new Promise((resolve, reject) => {
		resolve('ok1 success')
	})
	var failed1 = new Promise((resolve, reject) => {
		reject('failed1 failed')
	}).then(null, ()=> {})

	var p1 = new Promise((resolve, reject) => {
		// resolve(ok1)
		resolve(Promise.resolve(ok1))
	})

	p1.then(value=> {
		console.log('value =>', value)
	}, reason=> {
		console.warn('reason =>', reason)
	})
	</script>
</body>
</html>